<extend name="Public:base" />

<block name="style">
    <style>
        .main{width:830px;}
        .butn{border:0px;background: url("__PUBLIC__/imgs/show_option.png");width: 76px;height: 28px;font-size: 14px;color:#fff;line-height: 28px;padding-right: 15px;}
        .butn:hover{cursor: pointer;background: url(".__PUBLIC__/imgs/show_option_active.png");}
        .tijiao{width:108px;height:43px;border: 0px;background: url("__PUBLIC__/imgs/bg_big_blue.jpg");color: white;text-align: center;line-height: 20px;font-size: 17px;}
        .tijiao:hover{cursor: pointer;background: url(".__PUBLIC__/imgs/bg_big_blue_hover.jpg");}
    </style>
</block>

<block name="main">
    <div class="main">
        <div class="order">
            <table class="order-list-nav">
                <tbody>
                    <tr>
                        <td class="cell-1">商品信息</td>
                        <td class="cell-4">单价(元)</td>
                        <td class="cell-4">数量</td>
                        <td class="cell-5">实付款（元）</td>
                        <td class="cell-6">全部状态</td>
                        <td class="cell-7">操作</td>
                    </tr>
                </tbody>
            </table>
            <div class="mainbg"></div>
            <div class="appraise-manage">
                <div class="photo-tab">
                    <span class="other-text">已购买的商品，只能评价一次，请认真客观评价。</span>
                    <ul class="clearfix">
                        <li class="hover">我购买的商品</li>
                    </ul>
                </div>
                <foreach name='detaillist' item='vall'>
                <if condition="$vall.sg eq 1">
                <div style="width:788px;height:100%;border:1px solid #E0E0E0">
                    <p class="no-appraise">亲，您尚未购买任何商品</p>
                </div>
                <else />
                <div class="order-infor mt">
                    <span>订单编号：{$vall[0].orderid}</span>
                    <span>下单时间：{$vall[0].addtime}</span>
                </div>  
                <table class="order-list" border="0" cellspacing="0" cellpadding="0">
                   <tbody>                   
                        <tr>
                            <td> 
                                <foreach name='vall' item='val'>
                                <div class="product-infor"> 
                                    <!--<div class="subproduct first clearfix">-->
                                    <div class="subproduct clearfix"> 
                                        <a class="pic" href="" ><img height="60" width="80" src="__ROOT__/Uploads/{$val['picname']}"></a>
                                        <div class="infor">
                                            <h3><a href="{:U('Goods/detail?id='.$val[goodsid])}" target="_blank">{$val.name}</a></h3>
                                            <h3><a target="_blank" href="">[交易快照]</a></h3>
                                        </div>
                                        <br/><br/>
                                        <div class="price">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$val.price}</div>
                                        <div class="num">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{$val.num}</div>
                                        <div class="aftermarket"></div>     
                                    </div>  
                                </div> 
                                </foreach> 
                            </td>
                            <td class="sum">
                                <br/>
                                <p class="order-price">{$val.total}</p>
                                <p class="send-price">（免运费）</p>             
                            </td>
                            <td class="status">     
                                <p class="red"  style="color:#FF5500">{$val.orderstatus}</p>                                      
                            </td>

                            <if condition="$val.orderstatus eq '新订单'">
                              <td class="operate">
                              <a href="{:U('Home/Order/cancel?id='.$vall[0]['orderid'])}" onFocus="this.blur()" ><span class="label label-danger radius">取消订单</span></a>
                               </td>            
                                                 
                            <elseif condition="$val.orderstatus eq '已发货'"/>
                                <td class="operate">
                                <a href="{:U('Home/Order/shouhuo?id='.$vall[0]['orderid'])}" onFocus="this.blur()"><span class="label label-primary radius">收到货物</span></a>
                                </td>
                            <elseif condition="$val.orderstatus eq '无效订单'"/>
                                <td class="operate">
                                <a href="{:U('Home/Order/del?id='.$vall[0]['orderid'])}" onFocus="this.blur()"><span class="label label-primary radius"></span></a>
                                </td>
                                
                            <else/>
                                <if condition="$val.status eq '0'">
                                <td class="operate">  
                                <a href="{:U('Comment/comment?id='.$vall[0]['orderid'])}" onFocus="this.blur()"><span class="label label-primary radius">去评价</span></a>
                                </td>
                                <else />
                                <td class="operate">  
                                <a href="{:U('Comment/detail?id='.$vall[0]['orderid'])}" onFocus="this.blur()"><span class="label label-primary radius">评价请情</span></a>
                                </td>
                                </if>
                            </if>
						</if>
                        </tr>                   
                    </tbody>
                </table>
                </foreach> 
                <div class="pagination">
                <ul>
                    {$pageButton}
                </ul>
                
            </div>     
            </div>
        </div>
    </div>
	</div>
</block>
